<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="true">
      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
        <a-row>
          <a-col :span="24">
            <a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
              <a-input v-model="model.productName" placeholder="请输入产品名称"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="产品上市时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="timeToMarket">
              <j-date placeholder="请选择产品上市时间" v-model="model.timeToMarket"  style="width: 100%" />
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="持续供货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplyTime">
              <a-input v-model="model.supplyTime" placeholder="请输入持续供货时间"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="供货量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplyQuantity">
              <a-input v-model="model.supplyQuantity" placeholder="请输入供货量"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="供应时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="availableTime">
              <a-input v-model="model.availableTime" placeholder="请输入供应时间"  ></a-input>
            </a-form-model-item>
          </a-col>
        
        
        </a-row>
      </a-form-model>
    </j-form-container>
  </a-spin>
</template>

<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'

export default {
  name: 'ZzzsRecordEnterpriseForm',
  components: {},
  props: {
    //表单禁用
    disabled: {
      type: Boolean,
      default: false,
      required: false,
    },
    id: {
      type: String,
      required: false,
    },
  },
  data() {
    return {
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      validatorRules: {
        contactNumber: [{ required: false }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!' }],
      },
      url: {
       
        queryById: "/modules/zzzsRecordOfSupplyAbility/queryById"
      },
    }
  },
  computed: {},
  created() {

    this.getInfo()
  },
  methods: {
    getInfo() {
      getAction(this.url.queryById, { id: this.id }).then((res) => {
        console.log(res)
        this.model = res.result
      })
    },
  },
}
</script>